分享至
template<typename T> struct Array_TwoDimensional { std::vector<T> data; unsigned int x=0; unsigned int y=0; };
初始化:
Array_TwoDimensional<float> array; array.x = 1; array.y = 1;
插入
array.data.push_back(XXX);
IT邦幫忙